POV-Ray : Newsgroups : povray.general : Any way to avoid repeated parsing? : Re: Any way to avoid repeated parsing? Server Time
11 Aug 2024 09:24:59 EDT (-0400)
  Re: Any way to avoid repeated parsing?  
From: Nieminen Juha
Date: 17 Sep 1999 03:13:21
Message: <37e1ea11@news.povray.org>
Bob Hughes <inv### [at] aolcom> wrote:
: I'm not totally inner workings savy, but yes, from what I understand
: the visible scene is calculated so the other stuff can be dropped out.

  You can't do that. You have no way to know if an object will be visible
through reflection/refraction (other than actually raytracing the scene).
If an object was not hit by any ray in the previous frame, you have no way
to know if it will be hit or not in the current frame.
  Automatically declaring objects as "static" depending on whether the clock
value affects them or not is a mathematically impossible problem (AFAIK).
You can always write a program which is not analytically solvable.
Numerical solving would be at least as slow as the actual parsing of the
scene, so no benefits would be achieved.
  You can only be sure that an object is not affected by the clock value
when it doesn't use any identifier which has been "touched" by 'clock'
(or other identifiers which have been "touched", etc). The same thing for
'clock_delta'.
  This is not enought, though. An object may depend on the clock value even
if it doesn't use any identifier. For example:
  #if(clock<.5) sphere { 0,1 pigment { rgb 1 } } #end

  But even this is not enough. The object may depend on the contents of an
external file (which is #read during parsing and which may change from
frame to frame).

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.